package com.yunhe.inspect.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.inspect.domain.CompletionOfInspection;
import com.yunhe.inspect.domain.OrgInspectAnalysis;
import com.yunhe.inspect.domain.OrgPeopleInspectAnalysis;
import com.yunhe.inspect.domain.ProportionOfFormsByDepartment;

import java.util.List;

/**
 * @author zhengbo
 * @date 2021/11/17 15:10
 */
public interface InspectAnalysisService {

    /**
     * 获取单子大于等于10的组织列表
     * @return
     */
    List<OrgInspectAnalysis> getOrgInspectAnalysisList() throws ArgumentErrorException;

    /**
     * 根据组织和时间查询检查人检查情况
     * @param orgId
     * @param timeType day,week,month,quarterly,year
     * @return List<OrgPeopleInspectAnalysis>
     */
    List<OrgPeopleInspectAnalysis> countNumberOfInspectionOrders(Long orgId, String timeType);

    /**
     * 查询组织的所有状态下的巡检单数量
     * @param startTime
     * @param endTime
     * @return List<ProportionOfFormsByDepartment>
     */
    List<ProportionOfFormsByDepartment> countNumberOfInspectionOrdersForEachDepartment(String startTime, String endTime) throws ArgumentErrorException;

    /**
     * 统计当前园区下所有状态的巡检单数量情况
     * @param startTime
     * @param endTime
     * @return CompletionOfInspection
     */
    CompletionOfInspection percentageOfCompletedInspectionOrders(String startTime, String endTime) throws ArgumentErrorException;
}
